package com.yjq0713.test6;

public class Triangle extends Graph {
    private double a;
    private double b;

    Triangle(double a, double b) {
        this.a = a;
        this.b = b;
    }

    public void setA(double a) {
        this.a = a;
    }

    public void setB(double b) {
        this.b = b;
    }

    @Override
    public double area() {
        return a * b * 0.5;
    }
}
